<%--
  Created by IntelliJ IDEA.
  User: QiangweiLuo
  Date: 12/19/2018
  Time: 11:46 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>投票列表</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" />
</head>
<body>
<%@include file="top.jsp"%>

    <div id="vote" class="wrap" data-genuitec-lp-enabled="false" data-genuitec-file-id="wc4-2" data-genuitec-path="/vote/WebRoot/WEB-INF/pages/list.jsp">
        <h2>投票列表</h2>
        <ul class="list">

            <c:forEach var="subject" items="${subjectList }">
                <li <c:if test='${currdate > subject.endtime}'>class="odd"</c:if><c:if test='${currdate >= subject.starttime and currdate <= subject.endtime}'>class="young"</c:if>>
                <h4>
                <a href="${pageContext.request.contextPath}/list/vote?method=forward&id=${subject.id}">${subject.title}</a>
                </h4>
                    <div class="join"><c:if test='${currdate >= subject.starttime and currdate <= subject.endtime}'><a href="${pageContext.request.contextPath}/list/vote?method=forward&id=${subject.id}">我要参与</a></c:if></div>
                <p class="info">共有${subject.numberView}个选项，已有${subject.count}个网友参与了投票。</p>
                    <p>开始时间：${subject.startTimeView}　　　　　　结束时间：${subject.endTimeView}　　　　　　<c:if test='${currdate > subject.endtime}'>已结束</c:if><c:if test='${currdate < subject.starttime}'>未开始</c:if><c:if test='${currdate >= subject.starttime and currdate <= subject.endtime}'>进行中</c:if></p>
                </li>
            </c:forEach>

        </ul>
    </div>
    <div id="footer" class="wrap">
        艾特优软件 &copy; 版权所有
    </div>
    <script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/scripts/heartbeat.js"></script>
</body>
</html>
